<template>
  <FormItem label="字体样式">
    <Select :value="value" @on-change="v=>{changeValue(v)}">
      <Option v-for="(unit,order) of options" :key="order" :value="unit.value">{{unit.label}}</Option>
    </Select>
  </FormItem>
</template>

<script>
export default {
  props: ['value'],
  data () {
    return {
      options: [
        {
          label: '无',
          value: 'normal'
        },
        {
          label: '斜体',
          value: 'italic'
        }
      ]
    };
  },
  methods: {
    changeValue (value) {
      this.$emit('updateValue', {
        value,
        name: 'fontStyle'
      });
    }
  }
};
</script>
